# -*- coding: utf-8 -*-
"""
Spyder Editor

This is a temporary script file.
"""

#

import pandas as pd
import matplotlib.pyplot as plt
data2 = pd.read_csv('zone2_time_counts.txt', sep=" ", header=None)
time_s2=pd.to_datetime(data2[0], format='%Y%m%d', errors='ignore')
fig= plt.figure(figsize=(10,6))
plt.plot(time_s2,data2[1], color='red',label="zone1")
data3 = pd.read_csv('zone3_time_counts.txt', sep=" ", header=None)
time_s3=pd.to_datetime(data3[0], format='%Y%m%d', errors='ignore')
plt.plot(time_s3,data3[1], color='orange',label="zone2")
data5 = pd.read_csv('zone5_time_counts.txt', sep=" ", header=None)
time_s5=pd.to_datetime(data5[0], format='%Y%m%d', errors='ignore')
plt.plot(time_s5,data5[1], color='green',label="zone3")
data6 = pd.read_csv('zone6_time_counts.txt', sep=" ", header=None)
time_s6=pd.to_datetime(data6[0], format='%Y%m%d', errors='ignore')
plt.plot(time_s6,data6[1], color='magenta',label="zone4")
data8 = pd.read_csv('zone8_time_counts.txt', sep=" ", header=None)
time_s8=pd.to_datetime(data8[0], format='%Y%m%d', errors='ignore')
plt.plot(time_s8,data8[1], color='brown',label="zone5")
data9 = pd.read_csv('zone9_time_counts.txt', sep=" ", header=None)
time_s9=pd.to_datetime(data9[0], format='%Y%m%d', errors='ignore')
plt.plot(time_s9,data9[1], color='blue',label="zone6")
plt.legend()
plt.ylabel('Cum. number of events (Depth < 40 km)')
plt.xlabel('Time')